class CreateProjects < ActiveRecord::Migration
  def self.up
    create_table :projects do |t|
      t.column :project_number,          :string, :limit => 50,  :null => false
      t.column :name,                    :string, :limit => 80,  :null => false
      t.column :address,                 :string, :limit => 100, :null => false
      t.column :owner_company_id,        :int,                   :null => false
      t.column :design_company_id,       :int,                   :null => false
      t.column :construction_company_id, :int,                   :null => false
      t.column :survey_company_id,       :int,                   :null => false
      t.column :created_at,              :date
      t.column :created_hour,            :string, :limit => 2    #ENUM PRESENTED BY STRING,OK?
      t.column :end_at,                  :date
      t.column :end_hour,                :string, :limit => 2
    end
  end

  def self.down
    drop_table :projects
  end
end
